package cn.gdrj.est.controller;

import cn.gdrj.est.dto.CommonResult;
import cn.gdrj.est.service.SmsVerifyCodeService;
import cn.gdrj.est.util.ResultUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 验证码控制器
 */
@RestController
@RequestMapping("/api/sms")
public class SmsVerifyCodeController {

    @Autowired
    private SmsVerifyCodeService verifyCodeService;


    @PostMapping("verifyCode")
    public CommonResult<Void> sendVerifyCode(@RequestParam String phone,
                                             @RequestParam Integer codeType){
        verifyCodeService.sendVerifyCode(phone,codeType);

        return ResultUtil.success();
    }

}
